import request from '@/utils/request'
// 登录
export const loginAPI = data => request({
  url: '/sys/login',
  method: 'POST',
  data
})
// 获取用户资料
export const getUserInfoAPI = () => request({
  url: '/sys/profile',
  method: 'POST'
})

/** *
 *  获取某个用户的基本信息
 *
 * ***/
export function getUserDetailByIdApi(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
/** *
 *
 * 保存员工的基本信息
 * **/
export function saveUserDetailByIdApi(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}
